import { createRouter, createWebHashHistory  } from "vue-router";
const routes = [

    {
        path: '/login',
        component: () => import('@/pages/login.vue')
    }, {
        path: '/',
        name: 'index',
        component: () => import('@/pages/index.vue'),
        children: [
            {
                path: '/admin',
                name: 'admin',
                component: () => import('@/pages/admin.vue')
            }, {
                path: '/user',
                name: 'user',
                component: () => import('@/pages/user.vue')
            }, {
                path: '/custom',
                name: 'custom',
                component: () => import('@/pages/custom.vue')
            }, {
                path: '/house_resource',
                name: 'house_resource',
                component: () => import('@/pages/house_resource.vue')
            }, {
                path: '/log',
                name: 'log',
                component: () => import('@/pages/log.vue')
            }, {
                path: '/logistics',
                name: 'logistics',
                component: () => import('@/pages/logistics.vue')
            }, {
                path: '/role',
                name: 'role',
                component: () => import('@/pages/role.vue')
            }
        ]
    }, 
    
    
]

export const router = createRouter({
    history: createWebHashHistory(),
    routes: routes
  })
  
  export default router